Skip to content

Conversation

nkanazawa1989
Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 commented Nov 12, 2021

Summary

This PR simplifies the interface of data processor.

Currently the processor has two interfaces:

nominals, error, history = my_processor.call_with_history(data)
nominals, error = my_processor(data)

to eliminate boilerplate code it internally implements _call_internals method, but its return type will dynamically change depending on input flag.

Details and comments

This PR simplifies the implementation by redefining the history mode as a callback. Namely,

history = DataLogger()

nominals, error = my_processor(data, callback=history)
history.data()

if you don't need history you just

nominals, error = my_processor(data)

so you can use the same interface.

@nkanazawa1989 nkanazawa1989 added the blocked Can't be worked on until another issue is resolved label Nov 12, 2021
@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't be worked on until another issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants